<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" 
	MasterPageFile="~/App_ThemeMasters/NoStyle/OneColumnLayout.Master" Inherits="Syrinx.Gui.AspNet.Nitobi2.NitobiBasePage" EnableEventValidation="false" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="Syrinx.Gui.AspNet.Nitobi2" Namespace="Syrinx.Gui.AspNet.Nitobi2" TagPrefix="snc" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>
<%@ Register Assembly="Articles.Gui.AspNet" Namespace="Articles.Gui.AspNet" TagPrefix="art" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<asp:Content ID="c1" ContentPlaceHolderID="mainContent" runat="server">
    <div class="verticalbg">
	    <swf:BizProc ID="bArt" runat="server" FactoryName="genericArticles">
		    <State entireTree="true" EditModeSessionKey="BlogGlobalEdit"  />
		    <ParentBizProc id="loginBP"  />
	    </swf:BizProc>
	    <swf:BizProc ID="bcArt" runat="server" FactoryName="genericArticles">
	    <State imageRes="Thumbnail" listDetailLevel="fullDetails" EditModeSessionKey="GlobalEdit" orderBy="(CASE WHEN [publishDate] IS NULL THEN nc.dateCreated ELSE [publishDate] END)" sortDir="DESC"  />
		    <ParentBizProc id="bArt" fieldName="id" dataId="pid" />
	    </swf:BizProc>
        <div class="clearer"></div>
	    <span class="button4"><snc:ActionButton runat="server" ID="editMode" Actions="bArt.SwitchEdit" Text="Edit" SessionBoolSwitch="BlogGlobalEdit"  /></span>
	    <span class="button1"><snc:ActionButton runat="server" ID="translationBtn" Actions="bArt.SwitchTranslation" Text="Translate" SessionBoolSwitch="TranslationMode" /></span>
	    <span class="button6"><snc:ActionButton runat="server" ID="updateBtn" Actions="bArt.UpdateBizObj" Text="Update" /></span>
	    <span class="button1"><snc:ActionButton runat="server" ID="setPicBtn" Actions="bArt.SetArticlePicture" Text="Set Image" ToolTip="Set primary media for this article" 
		    PopupPage="../popups/SetArticleImagePopup.aspx" PopupHeight="535px"  PopupWidth="820px" PopupTitle="Select a primary image for this article." /></span>
        <div class="clearer"></div>
        
		<div class="bloggerBioArea">
		<snc:NitobiBizObjDisplay ID="articleDetail1Display" runat="server"
			ParentBizProcIds="bArt"
			ReadOnlyTemplate="Articles.Gui.AspNet.ArticleDisplay-ROBlogBio" 
			EditableTemplate="Articles.Gui.AspNet.ArticleDisplay-BlogBio" />
		</div>
    </div>

	<div class="contentwrap">
        <div class="clearer"></div>
			<span class="button4"><snc:ActionButton runat="server" ID="ActionButton1" Actions="bcArt.SwitchEdit" Text="Edit" SessionBoolSwitch="GlobalEdit"  /></span>
			<span class="button1"><snc:ActionButton runat="server" ID="ActionButton2" Actions="bcArt.SwitchTranslation" Text="Translate" SessionBoolSwitch="TranslationMode" /></span>
			<span class="button1"><snc:ActionButton runat="server" ID="ActionButton12" Actions="bcArt.TranslateArticle" Text="Auto Translate" /></span>
			<span class="button1"><snc:ActionButton runat="server" ID="ActionButton3" Actions="bcArt.AddBizObj" Text="Add" /></span>
			<span class="button6"><snc:ActionButton runat="server" ID="ActionButton4" Actions="bcArt.UpdateBizObj" Text="Update" /></span>
			<span class="button1"><snc:ActionButton runat="server" ID="ActionButton5" Actions="bcArt.CancelEdits" Text="Cancel" /></span>
			<span class="button5"><snc:ActionButton runat="server" ID="ActionButton6" Actions="bcArt.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
			<span class="button1"><snc:ActionButton runat="server" ID="ActionButton7" Actions="bcArt.SetArticlePicture" Text="Set Image" ToolTip="Set primary media for this article" 
				PopupPage="../popups/SetArticleImagePopup.aspx" PopupHeight="535px" PopupWidth="800px" PopupTitle="Select a primary image for this article." /></span>
        <div class="clearer"></div>

		<snc:NitobiBizObjDisplay ID="bcd2" runat="server"
			ParentBizProcIds="bcArt"
			ReadOnlyTemplate=""
			EditableTemplate="Articles.Gui.AspNet.ArticleRWDisplay-SimpleEditor-NoReparent" />
		<div class="blogRoll">
	    <snc:ComplexBizObjListDisplay ID="ComplexBizObjListDisplay1" MaxElements="10" runat="server" 
		    ParentBizProcIds="bcArt"
		    ReadOnlyTemplate="Articles.Gui.AspNet.ArticleListDisplay-BlogStyle1" >
			<macros 
			navLink="javascript:if(document.getElementById('ctl00_mainContent_bcd2_baseTitle') == null)window.location.href='$CmpSetting(sitePath)$/articles/$CalcArticleIds($pid$,$uniqueId$)$.aspx';else $_bizProcId$BizProc.triggerEvent('$_controlId$','bizObjSelected','$id$');" />
	    </snc:ComplexBizObjListDisplay>
	    </div>
	</div>	
</asp:Content>
